/**
 * Classe criada para realizar a conexao com o banco de dados
 */
package utilitarios;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Conexao {
    
    public static  Connection getConnection (){
    
        try{
            String banco = "info_biblio";
            String url = "jdbc:mysql://localhost:3306/"+banco;
            String user = "admin";
            String pass = "admin";            
            Connection con = DriverManager.getConnection(url, user, pass);            
            return con;                         
        }catch(SQLException e){
            throw new RuntimeException(e);
        }
    }
    
}
